package com.jack.thinking.java._3;

/**
 * right shift assignment to int.
 * @author wangbingwu
 *
 */
public class RightShiftLeftType {
	public static void main(String[] args) {
		int i = -1;
		System.out.printf("primary            %40s, %5s \r\n" ,Integer.toBinaryString(i), i);
		i >>>= 10;
		System.out.printf("right shfit 10 bit %40s, %5s \r\n" ,Integer.toBinaryString(i), i);
		short s = -1;
		System.out.printf("primary            %40s, %5s \r\n" ,Integer.toBinaryString(s), s);
		s >>>= 10;
		System.out.printf("right shfit 10 bit %40s, %5s \r\n" ,Integer.toBinaryString(s), s);
		byte b = -1;
		b = (byte) (b<<10);
		System.out.printf("right shfit 10 bit %40s, %5s \r\n" ,Integer.toBinaryString(b), b);
	} 
}
